<template>
  <div class="wrap">
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            router
          >
            <el-submenu index="/home">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>导航1</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/home/test">
                    <!-- <router-link to="/home/test">考试管理</router-link> -->
                    考试管理
                </el-menu-item>
                <el-menu-item index="/home/testpaper">
                      <!-- <router-link to="/home/testpaper">试题管理</router-link> -->
                      试题管理
                </el-menu-item>
              </el-menu-item-group>
             </el-submenu>
            <el-menu-item index="/home/achieve">
              <i class="el-icon-menu"></i>
              <span slot="title">
                   
                      <router-link to="/home/achieve">成绩管理</router-link>
               
              </span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
 export default {
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>

<style scoped>
.wrap {
  height: 100%;
}
.el-container {
  height: 100%;
}
.el-header {
  background: green;
}
.el-aside {
  background: skyblue;
}
a {
    text-decoration: none;
}
.el-menu {
    height: 100%;
}

</style>